function init() {
	_initHeader();
	
	var array = new Array();
	
	array.push("Navigate to Custom Screen");
	array.push("Navigate to Custom Screen with parameter");
	array.push("Navigate to Native Screen");
	array.push("Navigate to Native Screen with parameter");
	array.push("Navigate to Remote Screen");
	array.push("Navigate to Web Screen");
	array.push("Navigate");
	array.push("Navigate with parameters");
	array.push("Back");
	array.push("Back with Results");
	array.push("BackTo");
	array.push("BackToOrNavigate");
	array.push("GoHome");
	array.push("Exit");
	
	draw_list(array);
}

function setOnListClickHandler(idx) {
	switch(idx) {
		case 0 :
			testCustomScreen();
		break;
		
		case 1 :
			testCustomScreenWithParameter();
		break;
		
		case 2 :
			testNativeScreen();
		break;
		
		case 3 :
			testNativeScreenWithParameter();
		break;
		
		case 4 :
			testRemoteScreen();
		break;
		
		case 5 :
			testWebBrowserScreen();
		break;
		
		case 6 :
			testNavigate();
		break;
		
		case 7 :
			testNavigateWithParameter();
		break;
		
		case 8 :
			testBack();
		break;
		
		case 9 :
			testBackWithResult();
		break;
		
		case 10 :
			testBackTo();
		break;
		
		case 11 :
			testBackToOrNavigate();
		break;
		
		case 12 :
			testGoHome();
		break;
		
		case 13 :
			testExit();
		break;
		
		default :
		break;
	}
}

function testCustomScreen() {
	navigate("customScreen1");
}

function testCustomScreenWithParameter() {
	var navigationRule = {
		"pageId" : "customScreen1",
		"parameters" : {
			"param1" : "Custom Screen 테스트페이지 입니다.",
			"param2" : "Navigate to Custom Screen with parameter",
			"param3" : "커스텀파라미터"
		}
	};
	
	navigation.navigate(navigationRule);
}

function testNativeScreen() {
	navigate("nativeScreen1");
}

function testNativeScreenWithParameter() {
	var navigationRule = {
		"pageId" : "nativeScreen1",
		"parameters" : {
			"param1" : "Native Screen입니다.",
			"param2" : "Navigate to Native Screen with Parameter",
			"param3" : "value3"
		}
	};
	
	navigation.navigate(navigationRule);
}

function testRemoteScreen() {
	navigate("remoteScreen");
}

function testWebBrowserScreen() {
	navigate("webBrowserScreen");
}

function testNavigate() {
	navigation.navigate("navigateTestPage");
}

function testNavigateWithParameter() {
	var navigationRule = {
		"pageId" : "navigateTestPage",
		"parameters" : {
			"param1" : "Navigate 테스트페이지입니다.",
			"param2" : "Navigate with Param",
			"param3" : "value3"
		}
	};
	
	navigation.navigate(navigationRule);
}

function testBack() {
	navigation.back();
}

function testBackWithResult() {
	var results = {};
	
	results.result1 = "Back with results";
	results.result2 = "value2";
	results.result3 = "value3";
	
	navigation.back(results);
}

function testBackTo() {
	var navigationRule = {
			"pageId" : "apitest",
			"parameters" : {
				"param1" : "apitest 화면으로 BackTo",
				"param2" : "value2",
				"param3" : "value3"
			}
		};
		
		navigation.backTo(navigationRule);
}

function testBackToOrNavigate() {
	var navigationRule = {
		"pageId" : "/html/main.html",
		"parameters" : {
			"param1" : "/html/main.html로 BackToOrNavigate",
			"param2" : "value2",
			"param3" : "value3"
		}
	};
	
	navigation.backToOrNavigate(navigationRule);
}

function testGoHome() {
	navigation.goHome();
}

function testExit() {
	if(device.platformName == "Android")
		navigation.exit();
	else
		alert("navigation.exit is not supported on" + device.platformName + "Platform");
}